package com.xss.bitmaptest;

import android.support.v7.app.AppCompatActivity;
import android.os.Bundle;
import android.view.View;
import android.widget.ImageView;

import com.xss.bitmaptest.util.BitmapUtil;

public class MainActivity extends AppCompatActivity {
    private ImageView imageView;

    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.activity_main);
        imageView = findViewById(R.id.image);
    }

    public void clickButton(View view) {
        imageView.setImageBitmap(BitmapUtil.decodeSampledBitmapFromResource(
                getResources(), R.mipmap.ic_launcher, 72, 72
        ));
    }
}
